<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>kotlin-Java混合开发 | litton ishir</title>
    <meta name="description" content="&quot;Someday&quot;sounds a lot like the thing people say when they actually mean &quot;Never&quot;. ">
    <link rel="icon" href="https://upload-images.jianshu.io/upload_images/1074123-dc819e68a5f3c3f7.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240">
    
    <link rel="preload" href="/assets/css/0.styles.956f79c0.css" as="style"><link rel="preload" href="/assets/js/app.b387b3a3.js" as="script"><link rel="preload" href="/assets/js/9.f57e2ac2.js" as="script"><link rel="prefetch" href="/assets/js/10.89f8a53a.js"><link rel="prefetch" href="/assets/js/11.79be8c9b.js"><link rel="prefetch" href="/assets/js/2.abd3539a.js"><link rel="prefetch" href="/assets/js/3.6b6c4ca0.js"><link rel="prefetch" href="/assets/js/4.93ebd6e9.js"><link rel="prefetch" href="/assets/js/5.9a8427c2.js"><link rel="prefetch" href="/assets/js/6.0cda6858.js"><link rel="prefetch" href="/assets/js/7.905ce75a.js"><link rel="prefetch" href="/assets/js/8.12136322.js">
    <link rel="stylesheet" href="/assets/css/0.styles.956f79c0.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="container"><div id="head-c"><div class="row"><div class="offset-lg-2 col-lg-8 offset-md-1 col-md-10"><h1 id="blog-name"><a href="/" class="router-link-active">
                litton ishir
            </a></h1> <a href="https://weibo.com/littonishir" target="_blank" class="social"><i class="fa fa-fw fa-weibo"></i></a><a href="https://github.com/littonishir" target="_blank" class="social"><i class="fa fa-fw fa-github"></i></a><a href="https://space.bilibili.com/268398214/" target="_blank" class="social"><i class="fa fa-fw fa-terminal"></i></a><a href="https://www.instagram.com/littonishir/" target="_blank" class="social"><i class="fa fa-fw fa-instagram"></i></a></div></div></div> <div class="row"><div class="offset-lg-2 col-lg-8 offset-md-1 col-md-10"><div><article><p class="post-page-meta">Mar 30, 2017</p> <hr> <div class="content"><h1 id="kotlin-java混合开发"><a href="#kotlin-java混合开发" aria-hidden="true" class="header-anchor">#</a> kotlin-Java混合开发</h1> <br> <h2 id="基本互操作"><a href="#基本互操作" aria-hidden="true" class="header-anchor">#</a> 基本互操作</h2> <br> <h3 id="属性读写"><a href="#属性读写" aria-hidden="true" class="header-anchor">#</a> 属性读写</h3> <br> <ul><li><p>Kotlin 自动识别 Java Getter/Setter</p></li> <li><p>Java 操作 Kotlin 属性通过 Getter/Setter</p></li></ul> <br> <h3 id="空安全类型"><a href="#空安全类型" aria-hidden="true" class="header-anchor">#</a> 空安全类型</h3> <br> <ul><li>Kotlin空安全类型的原理</li> <li>平台类型 Platfron Type</li> <li>@Nullable 和 @NotNull</li></ul> <br> <h3 id="几类函数的调用"><a href="#几类函数的调用" aria-hidden="true" class="header-anchor">#</a> 几类函数的调用</h3> <br> <ul><li>包级函数 : 静态方法</li> <li>扩转方法 : 带 Receiver 的静态方法</li> <li>运算符重载 : 带 Receiver 的对应名称的静态方法</li></ul> <br> <h3 id="常用注解的使用"><a href="#常用注解的使用" aria-hidden="true" class="header-anchor">#</a> 常用注解的使用</h3> <br> <ul><li>@JvmField : 将属性编译为 Java 变量</li> <li>@JvmStatic : 讲对象的方法编译成 Java 的静态方法</li> <li>@JvmOverloads : 默认参数生成重载方法</li> <li>@file:JvmName : 指定 Kotlin 文件编译后的类名</li></ul></div></article> <!----></div></div></div> <center><hr width="0%"> <span id="subtitle">&quot;Someday&quot;sounds a lot like the thing people say when they actually mean &quot;Never&quot;. </span> <div class="row"><div class="offset-lg-2 col-lg-8 offset-md-1 col-md-10"><p class="small">© 2019 litton ishir. Code released under the <a href="https://opensource.org/licenses/MIT" target="_blank">MIT License</a></p></div></div></center></div></div>
    <script src="/assets/js/app.b387b3a3.js" defer></script><script src="/assets/js/9.f57e2ac2.js" defer></script>
  </body>
</html>
